<?php

//shell 脚本调用
namespace App\Http\Controllers\Tenement;

use App\Common\json;
use App\Common\push;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class Propertyscript extends Controller{
    private $app_key = '09ae7f39eb877836195b52df';        //待发送的应用程序(appKey)，只能填一个。
    private $master_secret ='28783d0dacf52cfd12d952a6';    //主密码
    private $url = "https://api.jpush.cn/v3/push";      //推送的地址

    public function pro_reminder(){
        $data              = DB::table('srcipt') ->select('srcipt_phone','script_content','script_type')->get();
        foreach ($data as $value){
            $srcipt_phone   = $value ->srcipt_phone;
            $script_content  = $value ->script_content;
            $script_type     = $value ->script_type;
            $push   = new push($this ->app_key,$this ->master_secret,$this->url);
            $push ->send_pub($srcipt_phone,$script_content,$script_type);
        }
    }
}
